You are here: Symbol Reference > Dew Namespace > Dew.Stats Namespace > Dew.Stats.Units Namespace > Classes > Statistics Class > Statistics Methods > Percentile Method > Statistics.Percentile Method ([In] TVec, double, TPercentileMethod)
Dew Stats for .NET
ContentsIndexHome
Example

Calculate the 2nd quantile location = median position.

using Dew.Math; using Dew.Stats; using Dew.Stats.Units; namespace Dew.Examples { private void Example() { Vector a = new Vector(0); double pctile; a.SetIt(false, new double[] {1,2,3,10,15,21}); pctile = Statistics.Percentile(a,0.75,TPercentileMethod.pctMethodNPlus); // = 16.5 pctile = Statistics.Percentile(a,0.75, TPercentileMethod.pctMethodNMinus); // = 13.75 pctile = Statistics.Percentile(a,0.75,TPercentileMethod.pctMethodClosestN); // = 10 } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.